<div class="dialog-container mdl-shadow--8dp mdl-layout--fixed-header query-list-dialog"
    style="background-color: #fafafa" ng-class="['mode-'+dialog.mode]">
  <div class="kmi-header-row">
      <div class="header-title" ng-bind="dialog.queryTitle | translate"></div>
      <div class="kmi-side-btn right" ng-click="dialog.back();">
          <img src="image/icons/clear.png"></img>
          <div class="kmi-can-click"></div>
      </div>
  </div>
  <div class="kmi-layout-main-content">
    <div class="kmi-layout-page">
        <div class="condition-content" ng-if="dialog.condition">
            <div class="kmi-text-fields" ng-repeat="condition in dialog.condition">
                <input type="text" ng-model="condition.name" disabled="disabled" style="margin-right:8px;"></input>
                <input type="text" ng-model="condition.query_name" style="flex: 0 0 120px;" readonly="readonly"
                    ng-click="dialog.loadTypeList(condition,$index);" placeholder="{{'C00.condition'|translate}}"></input>
                <div class="tip" ng-if="!condition.require"><i class="material-icons">&#xE5CF;</i></div>
                <input type="text" mdl-datepicker="condition.value" ng-if="condition.data_type=='D'" placeholder="{{'C00.date'|translate}}" style="margin-left:8px;"></input>
                <input type="text" mdl-calculater="condition.value" ng-if="condition.data_type=='N'" placeholder="{{'C00.number'|translate}}" style="margin-left:8px;"></input>
                <input type="text" ng-model="condition.value" ng-if="!condition.data_type" placeholder="{{'C00.value'|translate}}" style="margin-left:8px;"></input>
            </div>
            <div class="btn-search">
                <button class="mdl-button mdl-js-button mdl-button--icon mdl-button--icon_prime" ng-click="dialog.search();">
                    <img src="image/icons/search2.png"></img> 
                </button>
            </div>
        </div>
        <div class="kmi-list column-selector" kmi-scrollbar="{{dialog.scrollbar}}">
            <div id="query_list_header" class="kmi-list__header">
                <div class="kmi-list__column column-check width-fixed" style="flex:0 0 32px"></div>
            </div>
            <div class="kmi-list__row-content">
                <div class="kmi-list__row" ng-class="{'is-select':dialog.IsSelect(item)}" id="query_list"
                    ng-repeat="item in dialog.getQueryResults() track by $index">
                    <div class="kmi-list__column kmi-list__column-icon column-check" style="flex:0 0 32px">
                        <img ng-src="{{item.$is_select?'image/icons/check1.png':'image/icons/check0.png'}}"></img>
                    </div>
                </div>
            </div>
        </div>
        <div class="btn-content">
            <div class="page-content" ng-if="dialog.pageInfo" ng-hide="dialog.pageInfo.totalPage == 0">
                <div class="page-icon">
                    <img src="image/icons/dropleft.png"></img>
                    <div class="kmi-can-click"  ng-click="dialog.pageInfo.nowPage = (dialog.pageInfo.nowPage-1<1?1:dialog.pageInfo.nowPage-1);"></div>
                </div>
                <label ng-bind="dialog.pageInfo.nowPage+' / '+dialog.pageInfo.totalPage"></label>
                <div class="page-icon">
                    <img src="image/icons/dropright.png"></img>
                    <div class="kmi-can-click"  ng-click="dialog.pageInfo.nowPage = (dialog.pageInfo.nowPage+1>dialog.pageInfo.totalPage?dialog.pageInfo.totalPage:dialog.pageInfo.nowPage+1);"></div>
                </div>
            </div>
            <div class="kmi-button kmi-button-confrim"  ng-click="dialog.confirm()" style="width:100px">
                <label ng-bind="'common.btn.confirm' | translate"></label>
                <div class="kmi-can-click"></div>
            </div>
            <div class="kmi-button kmi-button-cancel"  ng-click="dialog.cancel(dialog)" style="width:100px" ng-if="dialog.cancel">
                <label ng-bind="'common.btn.cancel' | translate"></label>
                <div class="kmi-can-click"></div>
            </div>
            <div style="height:16px;" ng-if="!dialog.cancel"></div>
        </div>
    </div>
  </div>
</div>
